Skip to content

donate-cpu.py: Use Boost library configuration if appropriate#1587

Merged
versat merged 2 commits intocppcheck-opensource:masterfrom
versat:donate_cpu_use_boost_library
Feb 4, 2019
Merged

donate-cpu.py: Use Boost library configuration if appropriate#1587
versat merged 2 commits intocppcheck-opensource:masterfrom
versat:donate_cpu_use_boost_library

Conversation

@versat
Copy link
Copy Markdown
Collaborator

@versat versat commented Jan 11, 2019

Add check to only use boost library if boost.cfg exists since it is very new.
If the boost.cfg does not exist Cppcheck would exit with an error and we
would not get the desired results.
Tested locally.

Copy link
Copy Markdown
Collaborator

@danmar danmar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@versat
Copy link
Copy Markdown
Collaborator Author

versat commented Jan 11, 2019

There is one known issue:
For each package the "cppcheck-options:" are printed. But only the options of the last cppcheck run. So currently the options for 1.86 are shown, not for HEAD. Since Boost is only used in HEAD there are no --library=boost options shown in the output currently.
I am not sure if it is worth to fix this for example by saving and showing the "cppcheck-options" for the base AND the HEAD version. Since most of them are most of the time redundant.

@versat
Copy link
Copy Markdown
Collaborator Author

versat commented Jan 11, 2019

Or should we wait with this PR until the next version is released so it is unlikely that the options differ?

@amai2012
Copy link
Copy Markdown
Collaborator

Or should we wait with this PR until the next version is released so it is unlikely that the options differ?

Sounds like a good idea

@versat versat added the merge-after-next-release Wait with merging this PR until after the next Release label Jan 11, 2019
@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Jan 26, 2019

Merge branch 'master' into donate_cpu_use_boost_library

Instead of git merge master in the future, please use git rebase master.

I would recommend a cleanup.

  1. goto your branch. git checkout donate_cpu_use_boost_library
  2. start a cleanup git rebase master -i
  3. An editor will be opened. The commits are shown. Before each commit it says "pick".
  4. For all Merge branch 'master'... commits change the "pick" to "squash"
  5. Save the changes and exit the editor
  6. A new editor will be opened where you write new commit message(s). Not sure exactly how that will look but put a # before each "Merge branch...".
  7. Save the changes and exit the editor.

Now the branch should look much better. There should only be your 2 commits.

To push that you will need to use git push -f.

@versat
Copy link
Copy Markdown
Collaborator Author

versat commented Jan 26, 2019

Ok i will try to clean it up.
Does it make any difference when it is squashed and merged in the end?

@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Jan 26, 2019

Does it make any difference when it is squashed and merged in the end?

in the end it does not matter.

@versat versat force-pushed the donate_cpu_use_boost_library branch from 51c30c0 to 5ac2bf0 Compare January 28, 2019 11:57
@versat
Copy link
Copy Markdown
Collaborator Author

versat commented Jan 28, 2019

Hmm, was that too much "rebase"? Somehow amai is now author of the commit :)

@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Jan 28, 2019

Thanks for the cleanup. I believe you can use git commit --amend --reset-author or something like that to fix the author.

@versat
Copy link
Copy Markdown
Collaborator Author

versat commented Jan 28, 2019

Good idea. I'll try that.

@versat versat force-pushed the donate_cpu_use_boost_library branch from 5ac2bf0 to 2da0dd0 Compare February 4, 2019 08:58
Add check to only use boost library if boost.cfg exists since it is very new.
If the boost.cfg does not exist Cppcheck would exit with an error and we
would not get the desired results.
Tested locally.
should be enabled after the release of Cppcheck 1.87.
@versat
Copy link
Copy Markdown
Collaborator Author

versat commented Feb 4, 2019

I have commented out the boost include detection and library usage. So this PR can be committed now to avoid rebasing it again and again.

@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Feb 4, 2019

sounds good.

@versat versat merged commit 360ba33 into cppcheck-opensource:master Feb 4, 2019
@versat versat deleted the donate_cpu_use_boost_library branch February 4, 2019 10:05
@danmar
Copy link
Copy Markdown
Collaborator

danmar commented Feb 4, 2019

It would be interesting to get a graph about how quick latest Cppcheck is compared to some old Cppcheck versions. I would like to be able to run that sometime. I guess that will require that we leave out various libraries and maybe other flags also.

@versat
Copy link
Copy Markdown
Collaborator Author

versat commented Feb 4, 2019

It would be interesting to get a graph about how quick latest Cppcheck is compared to some old Cppcheck versions. I would like to be able to run that sometime. I guess that will require that we leave out various libraries and maybe other flags also.

The information output is of not much interest in this case too i guess.
Maybe we should add a similar functionality like the one to obtain the version from the server. The client should request options for running Cppcheck, what is sent to the server and so on.
But i am not sure if it makes sense to collect these different data at one server that changes the options from time to time.
IMHO a second server would make sense here. That one could use older versions to compare with and special options to avoid library usage, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-after-next-release Wait with merging this PR until after the next Release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants